1. Field of the Invention
The present invention relates to a controlling method for assisting an application in controlling a Universal Serial Bus (USB) device. In particular, the application is executed in a processing platform where a first operation system is installed, but the USB device is plugged in a second operation system rather than the first operation system.
2. Description of the Prior Art
Referring to FIG. 1, FIG. 1 is a functional block diagram showing an essential component for controlling a USB by an application.
As shown in FIG. 1, the application 11 is executed in a processing platform where a first operation system 10 is installed. The USB device 30 is plugged in a second operation system 20 which is identical to the first operation system 10. In FIG. 1, the first operation system 10 and the second operation system 20 use a Windows operation system as an example.
The processing platform includes a USB device driver 12 and a first USB bus driver 13. The USB device driver 12 is coupled to the application 11, whereas the first USB bus driver 13 is coupled to the USB device driver 12. The USB device driver 12 creates, in response to a request from the application 11, a request to set up a USB request block (URB). The first USB bus driver 13 receives the USB request block created by the USB device driver 12 and transmits the USB request block out.
Under the second operation system, a URB receiving driver 21 receives the USB request block transmitted from the first USB bus driver 13. A USB host controlling driver 22, coupled to the USB device 30, is used for receiving the USB request block from the URB receiving driver 21 and for controlling the USB device 30 in accordance with the USB request block.
However, if the first operation system 10 and the second operation system 20 described above are different operation systems, for example, the first operation system 10 is a Windows operation system, and the second operation system 20 is a Linux operation system, the USB request block created in the first operation system 10 is not native in the second operation system 20; thus, the application 11 cannot operate the USB device 30.
Accordingly, the scope of the present invention is to provide a controlling method for assisting an application in controlling a USB device. The application is executed in a processing platform where a first operation system is installed, but the USB device is plugged in a second operation system rather than the first operation system, and the USB request block created in the first operation system is not native to the second operation system. The controlling method according to the invention is to resolve the problems described above.